package com.sqfw.project.knowledge.service.impl;

import java.util.List;
import com.sqfw.common.utils.DateUtils;
import com.sqfw.project.knowledge.domain.KlOperationsLog;
import com.sqfw.project.knowledge.mapper.KlOperationsLogMapper;
import com.sqfw.project.knowledge.service.KlOperationsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 知识库操作日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-08
 */
@Service
public class KlOperationsLogServiceImpl implements KlOperationsLogService
{
    @Autowired
    private KlOperationsLogMapper klOperationsLogMapper;

    /**
     * 查询知识库操作日志
     * 
     * @param id 知识库操作日志主键
     * @return 知识库操作日志
     */
    @Override
    public KlOperationsLog selectKlOperationsLogById(String id)
    {
        return klOperationsLogMapper.selectKlOperationsLogById(id);
    }

    /**
     * 查询知识库操作日志列表
     * 
     * @param klOperationsLog 知识库操作日志
     * @return 知识库操作日志
     */
    @Override
    public List<KlOperationsLog> selectKlOperationsLogList(KlOperationsLog klOperationsLog)
    {
        return klOperationsLogMapper.selectKlOperationsLogList(klOperationsLog);
    }

    /**
     * 新增知识库操作日志
     * 
     * @param klOperationsLog 知识库操作日志
     * @return 结果
     */
    @Override
    public int insertKlOperationsLog(KlOperationsLog klOperationsLog)
    {
        klOperationsLog.setCreateTime(DateUtils.getNowDate());
        return klOperationsLogMapper.insertKlOperationsLog(klOperationsLog);
    }

    /**
     * 修改知识库操作日志
     * 
     * @param klOperationsLog 知识库操作日志
     * @return 结果
     */
    @Override
    public int updateKlOperationsLog(KlOperationsLog klOperationsLog)
    {
        return klOperationsLogMapper.updateKlOperationsLog(klOperationsLog);
    }

    /**
     * 批量删除知识库操作日志
     * 
     * @param ids 需要删除的知识库操作日志主键
     * @return 结果
     */
    @Override
    public int deleteKlOperationsLogByIds(String[] ids)
    {
        return klOperationsLogMapper.deleteKlOperationsLogByIds(ids);
    }

    /**
     * 删除知识库操作日志信息
     * 
     * @param id 知识库操作日志主键
     * @return 结果
     */
    @Override
    public int deleteKlOperationsLogById(String id)
    {
        return klOperationsLogMapper.deleteKlOperationsLogById(id);
    }
}
